import React from 'react';
import { Routes, Route } from 'react-router-dom';
import { Layout } from 'antd';
import './styles/App.css';

// 导入布局组件
import AppHeader from './components/layout/AppHeader';
import AppSidebar from './components/layout/AppSidebar';
import AppFooter from './components/layout/AppFooter';

// 导入页面组件
import HomePage from './pages/HomePage';
import ChatPage from './pages/ChatPage';
import ContactsPage from './pages/ContactsPage';
import AnalyticsPage from './pages/AnalyticsPage';
import PUADetectionPage from './pages/PUADetectionPage';
import PUAAdvancedAnalysisPage from './pages/PUAAdvancedAnalysisPage';
import PUAConversationAnalysisPage from './pages/PUAConversationAnalysisPage';
import SettingsPage from './pages/SettingsPage';
import NotFoundPage from './pages/NotFoundPage';

const { Content } = Layout;

function App() {
  return (
    <Layout className="app-container">
      <AppHeader />
      <Layout className="main-layout">
        <AppSidebar />
        <Layout>
          <Content className="site-content">
            <Routes>
              <Route path="/" element={<HomePage />} />
              <Route path="/chat" element={<ChatPage />} />
              <Route path="/contacts" element={<ContactsPage />} />
              <Route path="/analytics" element={<AnalyticsPage />} />
              
              {/* PUA相关路由 */}
              <Route path="/pua/detection" element={<PUADetectionPage />} />
              <Route path="/pua/advanced" element={<PUAAdvancedAnalysisPage />} />
              <Route path="/pua/conversation-analysis" element={<PUAConversationAnalysisPage />} />
              
              <Route path="/settings" element={<SettingsPage />} />
              <Route path="*" element={<NotFoundPage />} />
            </Routes>
          </Content>
          <AppFooter />
        </Layout>
      </Layout>
    </Layout>
  );
}

export default App; 